<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<body>
	<div class="navbar navbar-default navbar-static-top" th:fragment="header">
		<div class="container">
			<div class="navbar-header">
				<a class="navbar-brand" href="/">JDevCN</a>
			</div>
			
			<form class="navbar-form navbar-left">
				<div class="input-group">
					<input type="text" class="form-control" placeholder="Search">
					<div class="input-group-btn">
						<button class="btn btn-default" type="submit">
							<i class="glyphicon glyphicon-search"></i>
						</button>
					</div>
				</div>
			</form>

			<ul class="nav navbar-nav navbar-right" sec:authorize="isAnonymous()">
				<li class="active"><a href="/">首页</a></li>
				<li><a href="../user/registration">注册</a></li>
				<li><a href="../user/login">登录</a></li>
			</ul>
			
			<ul class="nav navbar-nav navbar-right" sec:authorize="isAuthenticated()">
                <li><a href="#" sec:authentication="name"></a></li>
                <li><a href="../user/settings">设置</a></li>
                <li><a href="../dashboard" sec:authorize="hasAuthority('ADMIN')">管理</a></li>
                <li><a th:href="@{/logout}">登出</a></li>
			</ul>
		</div>
	</div>
</body>
</html>